﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace SQLConnection
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void GridView1_Insert(object sender, GridViewCommandEventArgs e)
        {

        }

        protected void Button1_Click1(object sender, EventArgs e)
        {
            string mssv = ((TextBox)GridView1.FooterRow.FindControl("mssv")).Text;
            string ten = ((TextBox)GridView1.FooterRow.FindControl("ten")).Text;
            SqlDataSource1.InsertParameters["mssv"].DefaultValue = mssv;
            SqlDataSource1.InsertParameters["ten"].DefaultValue = ten;
            SqlDataSource1.Insert();
        }
    }
}
